function [pupil_diam]=correct_pupil_diam(pupil_d)

a=(pupil_d(1,:)+pupil_d(2,:));
b=(pupil_d(3,:)-pupil_d(4,:));

pupil_diam=[];
for und=1:length(a)
    pupil_diam(und)=sqrt((a(und)/2)^2+(b(und)/2)^2);
end